package com.ruoyi.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取项目相关配置
 *
 * @author ruoyi
 */
@Component
@ConfigurationProperties(prefix = "ruoyi")
public class RuoYiConfig {
    /**
     * 上传路径
     */
    private static String profile;

    /**
     * 文件备份路径
     */
    private static String profileBak;
    /**
     * 获取地址开关
     */
    private static boolean addressEnabled;
    /**
     * 验证码类型
     */
    private static String captchaType;
    /**
     * 项目名称
     */
    private String name;
    /**
     * 版本
     */
    private String version;
    /**
     * 版权年份
     */
    private String copyrightYear;
    /**
     * 实例演示开关
     */
    private boolean demoEnabled;

    public static String getProfile() {
        return profile;
    }

    public static String getProfileBak() {
        return profileBak;
    }

    public void setProfileBak(String profileBak) {
        RuoYiConfig.profileBak = profileBak;
    }

    public void setProfile(String profile) {
        RuoYiConfig.profile = profile;
    }

    public static boolean isAddressEnabled() {
        return addressEnabled;
    }

    public void setAddressEnabled(boolean addressEnabled) {
        RuoYiConfig.addressEnabled = addressEnabled;
    }

    public static String getCaptchaType() {
        return captchaType;
    }

    public void setCaptchaType(String captchaType) {
        RuoYiConfig.captchaType = captchaType;
    }

    /**
     * 获取导入上传路径
     */
    public static String getImportPath() {
        return getProfile() + "/import";
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath() {
        return getProfile() + "/avatar";
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath() {
        return getProfile() + "/download/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath() {
        return getProfile() + "/upload";
    }

    /**
     * 获取任务附件路径
     *
     * @return
     */
    public static String getRwFileUploadPath() {
        return getProfile() + "/rw_file";
    }

    /**
     * 获取任务附件路径
     *
     * @return
     */
    public static String getRwFileV3UploadPath() {
        return getProfile() + "/rw_file_v3";
    }

    /**
     * 获取任务结果表附件路径
     *
     * @return
     */
    public static String getRwjgFileUploadPath() {
        return getProfile() + "/rwjg_file";
    }

    /**
     * 获取任务结果表附件路径
     *
     * @return
     */
    public static String getRwjgFileV3UploadPath() {
        return getProfile() + "/rwjg_file_v3";
    }

    /**
     * 获取任务推送附件路径
     *
     * @return
     */
    public static String getRwtsFileUploadPath() {
        return getProfile() + "/rwts_file";
    }
    /**
     * 获取任务整改附件路径
     *
     * @return
     */
    public static String getRwZgFileUploadPath() {
        return getProfile() + "/rwzg_file";
    }

    /**
     * 获取问题整改附件路径
     *
     * @return
     */
    public static String getWtZgFileUploadPath() {
        return getProfile() + "/wtzg_file";
    }
    /**
     * 获取立案查处附件路径
     *
     * @return
     */
    public static String getLaccFileUploadPath() {
        return getProfile() + "/lacc_file";
    }
    //=======================备份路径=================================//
    /**
     * 获取任务附件备份路径
     *
     * @return
     */
    public static String getRwFileBakUploadPath() {
        return getProfileBak() + "/rw_file";
    }
    /**
     * 获取任务推送附件备份路径
     *
     * @return
     */
    public static String getRwtsFileBakUploadPath() {
        return getProfileBak() + "/rwts_file";
    }
    /**
     * 获取任务附件备份路径
     *
     * @return
     */
    public static String getRwZgFileBakUploadPath() {
        return getProfileBak() + "/rwzg_file";
    }

    /**
     * 获取矿山附件路径
     *
     * @return
     */
    public static String getKsFileUploadPath() {
        return getProfile() + "/ks_file";
    }

    /**
     * 获取任务shp附件路径
     *
     * @return
     */
    public static String getRwShpUploadPath() {
        return getProfile() + "/rw_shp";
    }

    /**
     * 获取任务shp附件路径
     *
     * @return
     */
    public static String getRwShpV3UploadPath() {
        return getProfile() + "/rw_shp_v3";
    }

    /**
     * 获取矿山附件路径
     *
     * @return
     */
    public static String getKsZycrFileUploadPath() {
        return getProfile() + "/ks_zycr_file";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getCopyrightYear() {
        return copyrightYear;
    }

    public void setCopyrightYear(String copyrightYear) {
        this.copyrightYear = copyrightYear;
    }

    public boolean isDemoEnabled() {
        return demoEnabled;
    }

    public void setDemoEnabled(boolean demoEnabled) {
        this.demoEnabled = demoEnabled;
    }

    /**
     * 获取矿产核查情况xcel模板路径
     *
     * @return
     */
    public static String gethcqkExcelTemplatePath() {
        return getProfile() + "/template/hecha-emplate.xlsx";
    }

    public static String gethcqkExcelTemplatePathNew() {
        return getProfile() + "/template/hcqk-template.xlsx";
    }

    public static String getrwtzExcelTemplatePath() {
        return getProfile() + "/template/rwtz-template.xlsx";
    }

    public static String getrwtzV3ExcelTemplatePath() {
        return getProfile() + "/template/rwtz-template-v3.xlsx";
    }

    /*
     获取清单模板路径
    */
    public static String getrwqdExcelTempLatePath(){
        return getProfile() + "/template/rwqd-template.xlsx";

    }

    /**
     * 矿山列表导出模板
     * @return
     */
    public static String getKsListExcelTempLatePath(){
        return getProfile() + "/template/kslb-template-v3.xlsx";

    }

    /**
     * 获取矿产资源开发利用xcel模板路径
     *
     * @return
     */
    public static String getKczykflyExcelTemplatePath() {
        return getProfile() + "/template/kczyly-template.xlsx";
    }

    /**
     * 获取矿产资源勘查Excel模板路径
     *
     * @return
     */
    public static String getKczykcExcelTemplatePath() {
        return getProfile() + "/template/kczykc-template.xlsx";
    }

    /**
     * 获取储量核查Excel模板路径
     *
     * @return
     */
    public static String getClhcExcelTemplatePath() {
        return getProfile() + "/template/clhc-template.xlsx";
    }

    /**
     * 获取矿山修复Excel模板路径
     *
     * @return
     */
    public static String getKsxfExcelTemplatePath() {
        return getProfile() + "/template/ksxf-template.xlsx";
    }

    /**
     * 获取临时存储路径
     *
     * @return
     */
    public static String getTempPath() {
        return getProfile() + "/temp";
    }

    /**
     获取任务清单路径
    */
    public static String getRwqdExcelTempLatePath(){
        return getProfile() + "/template/rwqd-template.xlsx";

    }
}
